<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/taglibs.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="${ctx}/resources/semantic/dist/semantic.min.css"
	rel="stylesheet" type="text/css" />
<link href="${ctx}/resources/semantic/dist/components/icon.min.css"
	rel="stylesheet" type="text/css" />
<link href="${ctx}/resources/apps.css" rel="stylesheet" type="text/css" />
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?63eb239345268c518caa9b38c60bfc89";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<c:choose>
	<c:when test="${companyName == '飞利浦'}">
		<title>MedTalent医人才|邀您查看飞利浦医疗本周热招职位</title>
	</c:when>
	<c:when test="${companyName == '罗氏'}">
		<title>MedTalent医人才|邀您查看罗氏诊断本周热招职位</title>
	</c:when>
	<c:when test="${companyName == '波士顿'}">
		<title>MedTalent医人才|邀您查看波士顿科学本周热招职位</title>
	</c:when>
	<c:when test="${companyName == '登士柏'}">
		<title>MedTalent医人才|邀您查看登士柏本周热招职位</title>
	</c:when>
	<c:otherwise>
		<title>MedTalent医人才|邀您查看大健康行业本周热招职位</title>
	</c:otherwise>
</c:choose>
</head>
<body>
	<style type="text/css">

html, body, div, span, h1, h2, h3, h4, p, ul, li {
	margin: 0;
	padding: 0;
	border: 0px;
	vertical-align: baseline;
}

body {
	font-family: "Microsoft YaHei", "微软雅黑";
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
	content: '';
	content: none;
}

.top-view {
	height: 200px;
	background: url("${ctx}/resources/images/recruit/banner/banner.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view1 {
	height: 200px;
	background: url("${ctx}/resources/images/recruit/banner/job-img.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view2 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view3 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view4 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view5 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view6 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view7 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view8 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}
.top-view9 {
	height: 200px;
	background: url("${ctx}/resources/images/img/background.jpg") no-repeat;
	background-size: 100%;
	background-position: center;
	color: #fff;
	text-align: center;
}

.top-view .logo {
	padding-top: 40px;
}

.top-view .logo img {
	width: 70px;
}

.top-view .title {
	font-size: 18px;
	margin-top: 3px;
}

.top-view .list_content {
	margin-top: 5px;
}

.top-view .web_url {
	margin-top: 10px;
}

.top-view .menu {
	width: 28px;
	float: right;
	padding-right: 9px;
	margin-top: -8px;
}

.top-view .menu img {
	width: 100%;
	height: 100%;
}

.content {
	font-size: 14px;
}

.list {
	padding: 0 15px;
	margin-top: 11px;
}

.list .list_title {
	font-size: 16px;
	 color: #005bac; 
	font-weight:bold;
}

.list .list_title .redhead {
	 color: #F67530;
	 padding-right: 5px;
	 font-weight:blod;
 }

.list .list_title .bluehead {
	color: blue;
	padding-right: 5px;
	font-weight:blod;
}

.list .list_title .yellowhead {
	color: yellow;
	padding-right: 5px;
	font-weight:blod;
}

.list .list_content {
	line-height: 24px;
	margin-top:10px;
}

.list .list_content .content_title {
	padding-right: 40px;
}

.list .list_foot {
	font-size: 14px;
	margin-top: 10px;
	overflow:hidden;
}
.list .list_foot .list_foot_bottom >span{
	font-size:14px;
}
.list_foot .content_title:nth-child(3){
	float:right;
}
.list .list_foot .bottom_icon {
	display: inline-block;
	width: 14px;
}
.list_foot .right{
	display: inline-block;
	float: right;
}
.list_foot .right .content_title{
	color:#F67530
}

.list .list_foot .bottom_icon img {
	width: 100%;
	height: 100%;
}
.list .list_foot .bottom_icon.bottom_icon_position img{
	position:relative;
	top:2px;
}
#icon{
	margin-left:10px;
}
 
</style>

<%--   <c:choose>--%>
<%--	   <c:when test="${domain == 'IVD'}"> <div class="top-view1" /> </c:when>--%>
<%--	   <c:when test="${domain == '影像'}"> <div class="top-view2" /> </c:when>--%>
<%--	   <c:when test="${domain == '超声'}"> <div class="top-view3" /> </c:when>--%>
<%--	   <c:when test="${domain == '心血管科'}"> <div class="top-view4" /> </c:when>--%>
<%--	   <c:when test="${domain == '牙科'}"> <div class="top-view5" /> </c:when>--%>
<%--	   <c:when test="${domain == '普药/特药'}"> <div class="top-view6" /> </c:when>--%>
<%--	   <c:when test="${domain == '高值耗材'}"> <div class="top-view7" /> </c:when>--%>
<%--	   <c:when test="${domain == 'CRO'}"> <div class="top-view8" /> </c:when>--%>
<%--	   <c:when test="${domain == '医疗数字化'}"> <div class="top-view9" /> </c:when>--%>
<%--	   <c:when test="${domain == '其他'}"> <div class="top-view" /> </c:when>--%>
<%--   </c:choose>--%>

	<div class="top-view" id="top-view-id"></div>
	<div class="ui segment" id="n-page" style="margin: 0rem 0;padding-bottom:0px;">

		<!-- 搜索 -->
		<div>
			<form action="${ctx}/recurit/jobList.page" method="get">
			快速检索:
				<input type="text" name="selectParams" id="selectParams"  placeholder=" 公司/职位" /><br/>
				<input type="hidden" id ="domain" value="${domain}" >
				<input type="hidden" id ="companyName" value="${companyName}" >
				<input type="hidden" id ="companyBusiness" value="${companyBusiness}" >
			工作地点:
			<select name="city" id="city">
				<option value="">--请选择地点--</option>
				<c:forEach items="${city}" var="c">
				<option value="${c.name}">${c.name}</option>
				</c:forEach>
			</select>
		</form>
		</div>

		<br/>
		<div style="background-color: rgba(0,0,0,.12);height: 1px;width: 100%;"></div>

		<c:choose>
				<c:when test="${jobs == null or fn:length(jobs)==0 }">  没有相关职位信息    </c:when>
				<c:otherwise>
					<div class="ui middle aligned divided list" id="row-data">

						<c:forEach items="${jobs}" var="jd">
						
    					<div class="position" data-position-id="${jd.jobId}">
							<div class="list">
								<div class="list_title">
									<c:choose>
										<c:when test="${jd.companyBusiness == '1' }">
											<span class="redhead">[销售]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '2' }">
											<span class="redhead">[市场]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '3' }">
											<span class="redhead">[研发]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '4' }">
											<span class="redhead">[运营]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '5' }">
											<span class="redhead">[质量]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '6' }">
											<span class="redhead">[法规/注册]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '7' }">
											<span class="redhead">[医学事务]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '8' }">
											<span class="redhead">[财务]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '9' }">
											<span class="redhead">[临床]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '10' }">
											<span class="redhead">[医疗服务]</span>${jd.jobName}
										</c:when>
										<c:when test="${jd.companyBusiness == '11' }">
											<span class="redhead">[售后]</span>${jd.jobName}
										</c:when>
										<c:otherwise>
											${jd.jobName}
										</c:otherwise>
									</c:choose>

								</div>

								<div class="list_foot" >
									<span class="content_title">${jd.companyName}</span>

									<div class="right" >
										<div class="bottom_icon" id="icon" >
											<img src="${ctx}/resources/images/img/price.png" alt="">
										</div>
										<span class="content_title">${jd.jobSalary}</span>
									</div>

								</div>
								<div class="list_foot list_foot_bottom">
									<div class="bottom_icon bottom_icon_position" >
										<img src="${ctx}/resources/images/img/location.png" alt="">
									</div>
									<span class="content_title">
											${jd.jobPlace}
									</span>

									<span class="content_title"> ${jd.startTime}</span>
								</div>
							</div>
							<br/>
							<div style="background-color: rgba(0,0,0,.12);height: 1px;width: 100%;"></div>
						</div>
						</c:forEach>
					</div>
				</c:otherwise>
			</c:choose>

	</div>
	<div></div>
	<input type="hidden" name="lastposition" id="lastposition"
		value="0" />
	<input type="hidden" name="hasmoredata" id="hasmoredata" value="yes" />


	<script src="${ctx}/resources/semanticui/jquery-2.1.4.min.js"></script>
	<script src="${ctx}/resources/semanticui/semantic.js"></script>
	<script src="${ctx}/resources/jweixin-1.0.0.js"></script>
	<script type="text/javascript">
	   wx.config({
	    debug: false,
	    appId: "${config.appid}",  
	    timestamp: ${config.currenttimestamp},  
	    nonceStr: "${config.nonceStr}", 
	    signature: "${config.signatureStr}", 
	    jsApiList: ['checkJsApi',
	        'onMenuShareTimeline',
	        'onMenuShareAppMessage',
	        'onMenuShareQQ',
	        'onMenuShareWeibo',
	        'showOptionMenu']  
	});
	   var reg = new RegExp("(^|&)domain=([^&]*)(&|$)");
	   var r = window.location.search.substr(1).match(reg);
	   if (r != null) {
		   $("#domain").val(decodeURI(r[2]));
	   }
		var domain =  $("#domain").val();


	   var reg1 = new RegExp("(^|&)companyName=([^&]*)(&|$)");
	   var r1 = window.location.search.substr(1).match(reg1);
	   if (r1 != null) {
		   $("#companyName").val(decodeURI(r1[2]));
	   }
	   var companyName =  $("#companyName").val();


	   var reg2 = new RegExp("(^|&)companyBusiness=([^&]*)(&|$)");
	   var r2 = window.location.search.substr(1).match(reg2);
	   if (r2 != null) {
		   $("#companyBusiness").val(decodeURI(r2[2]));
	   }
	   var companyBusiness =  $("#companyBusiness").val();


    var datasource = {
		//截取url的参数
		getQueryString:function(parameter) {
		   var reg = new RegExp("(^|&)" + parameter + "=([^&]*)(&|$)");
		   var r = window.location.search.substr(1).match(reg);
		   if (r != null) {
			   if (parameter == "domain") {
				   $("#domain").val(decodeURI(r[2]));
				   console.log(parameter+":"+decodeURI(r[2]))
			   }
			   if (parameter == "selectParams") {
				   $("#selectParams").val(decodeURI(r[2]));//解决中文乱码
				   console.log(parameter+":"+decodeURI(r[2]))

			   }
			   if (parameter == "city") {
				   $("#city").val(decodeURI(r[2]));//解决中文乱码
				   console.log(parameter+":"+decodeURI(r[2]))

			   }
			   if (parameter == "offset") {
				   $("#offset").val(decodeURI(r[2]));//解决中文乱码
				   console.log(parameter+":"+decodeURI(r[2]))

			   }
		   }
	   },
        moredata: function() {
			var offset  = $('#lastposition').val();
			var domain = $("#domain").val();
			var city = $('#city').val();
			var selectParams = $('#selectParams').val();
            var hasmore = $('#hasmoredata').val();
            var companyName = $('#companyName').val();
			var companyBusiness = $('#companyBusiness').val();
            if (companyName != '') {
				selectParams = companyName;
			}
            // if (domain == '') {
            // 	datasource.getQueryString("domain");
            // 	domain = $('#domain').val();
			// }
			// if (city == '') {
			// 	datasource.getQueryString("city");
			// 	city = $('#city').val();
			// }
			// if (selectParams == '') {
			// 	datasource.getQueryString("selectParams");
			// 	selectParams = $('#selectParams').val();
			// }

            var getUrl = '${ctx}/recurit/jobList.page?';
            getUrl += "offset=" + offset;
            getUrl += "&domain=" + domain;
			getUrl += "&city=" + city;
            getUrl += "&selectParams=" + selectParams;
            getUrl += "&comapnyName=" + companyName;
			getUrl += "&companyBusiness=" + companyBusiness;

            if(hasmore != "yes"){
                alert("已经没有更多数据了");
                return false;
            }
            var that = this;
            $.ajax({ 
                    url: getUrl, 
                    type: "GET", 
                    success: function(data, status){
						that.appenddata(data);
						// that.load(data);
                    }
            });
        },

        appenddata:function(data) {
            var offset = parseInt($('#lastposition').val());
            var divstring = "";
            var jobs = data.jobs;
			// console.log("data:"+data)

            // var count = jobs.length;
			// offset += parseInt(count);
			// $('#lastposition').val(offset);
			// if(count <10) {
			//     $('#hasmoredata').val('no');
			// }

			for (var i in jobs) {
                var jd = jobs[i];
                <%--divstring += "<div class='position' data-position-id='"+jd.id+"'> "--%>
                <%--divstring += "	<div class='list'> "--%>
                <%--divstring += "		<div class='list_title'> "--%>
                <%--divstring += 			jd.jobName--%>
                <%--divstring += "		</div> "--%>
                <%--divstring += "		<p class='list_content content'>"--%>
                <%--divstring += "			<span class='content_title'>" + jd.companyName + "</span>"--%>
                <%--divstring += "		</p >"--%>
                <%--divstring += "		<div class='list_foot'> "--%>
                <%--divstring += "			<div class='bottom_icon'> "--%>
                <%--divstring += "				<img src='${ctx}/resources/images/img/location.png' alt= ''>"--%>
                <%--divstring += "			</div> "--%>
                <%--divstring += "			<span class='content_title' style='color:#F67530;'>" + jd.jobPlace+ "</span> "--%>
                <%--divstring += "			<div class='bottom_icon' id='icon'> "--%>
                <%--divstring += "				<img src='${ctx}/resources/images/img/update.png' alt=''>"--%>
                <%--divstring += "			</div> "--%>
                <%--divstring += "			<span class='content_title'> " + jd.endTime + "</span> "--%>
                <%--divstring += "			<div class='bottom_icon' id='icon'> "--%>
                <%--divstring += "				<img src='${ctx}/resources/images/img/price.png' alt=''> "--%>
                <%--divstring += "			</div> "--%>
                <%--divstring += "			<span class='content_title'>jd.jobSalary</span> "--%>
                <%--divstring += "		</div> "--%>
                <%--divstring += "	</div> "--%>
                <%--divstring += "</div> "--%>
                <%--divstring += "<br/>"--%>
                <%--divstring += "<div style='background-color: rgba(0,0,0,.12);height: 1px;width: 100%;'></div>  "--%>

				divstring = "<div class=\"position\" data-position-id=\"${jd.jobId}\">\n" +
						"<div class=\"list\">\n" +
						"<div class=\"list_title\">\n" +
						"${jd.jobName}\n" +
						"</div>\n" +
						"<div class=\"list_foot\">\n" +
						"<div class=\"bottom_icon bottom_icon_position\" >\n" +
						"<img src=\"${ctx}/resources/images/img/location.png\" alt=\"\">\n" +
						"</div>\n" +
						"<span class=\"content_title\">\n" +
						"${jd.jobPlace}\n" +
						"</span>\n" +
						"<span class=\"content_title\"> ${jd.startTime}</span>\n" +
						"</div>\n" +
						"<div class=\"list_foot list_foot_bottom\">\n" +
						"<span class=\"content_title\">${jd.companyName}</span>\n" +
						"<span class=\"content_title\" style=\"margin-left: 5%\">${jd.companyType}</span>\n" +
						"<div class=\"right\">\n" +
						"<div class=\"bottom_icon\" id=\"icon\">\n" +
						"<img src=\"${ctx}/resources/images/img/price.png\" alt=\"\">\n" +
						"</div>\n" +
						"<span class=\"content_title\">${jd.jobSalary}</span>\n" +
						"</div>\n" +
						"</div>\n" +
						"</div>\n" +
						"<br/>\n" +
						"<div style=\"background-color: rgba(0,0,0,.12);height: 1px;width: 100%;\"></div>";
            }
            var newdata = $(divstring);
            $('#row-data').load(newdata);
        }
    };

   
	$(document).ready(function() { 
    	var l = sessionStorage.getItem('index_list');
   	 
    	if(null !== l && '' !== l){
    	    $("#row-data").html(l);
    	    $(window).scrollTop(sessionStorage.getItem('index_scroll'));
    	    page = sessionStorage.getItem('index_page');
    	    sessionStorage.removeItem('index_list');
    	    sessionStorage.removeItem('index_scroll');
    	}else{
    		datasource.moredata();
    	};

    	if(domain == 'IVD' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/IVD_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
    	}
		if(domain == '影像' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/yinxiang_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '超声' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '高值耗材' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '创新药' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '普药' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '数字化医疗' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '医疗投资' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '牙科' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/denta.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == 'CRO' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '其他' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/2.png) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(domain == '' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '飞利浦' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/flp_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '罗氏' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/ls_banner2.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '波士顿' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/bsd_banner1.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '登士柏' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/dentsply_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '拜耳' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/career_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '西门子' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/siemens_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '联影' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/uher_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == 'GE' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/ge_banner1.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '瓦里安' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/var_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
        if(companyName == '凯杰' ) {
            $('#top-view-id').css('height', '200px');
            $('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/jk_banner.jpg) no-repeat');
            $('#top-view-id').css('background-size','100%');
            $('#top-view-id').css('background-position','center');
            $('#top-view-id').css('color','#fff');
            $('#top-view-id').css('text-align','center');
        }
        if(companyName == '卡瓦' ) {
            $('#top-view-id').css('height', '200px');
            $('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/kw_banner.jpg) no-repeat');
            $('#top-view-id').css('background-size','100%');
            $('#top-view-id').css('background-position','center');
            $('#top-view-id').css('color','#fff');
            $('#top-view-id').css('text-align','center');
        }
		if(companyName == '吉利德' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/gilead_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '爱齐' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/align_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '丹纳赫' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/hz_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyName == '施乐辉' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/slh_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
		if(companyBusiness == '9' ) {
			$('#top-view-id').css('height', '200px');
			$('#top-view-id').css('background','url(${ctx}/resources/images/recruit/banner/lc_banner.jpg) no-repeat');
			$('#top-view-id').css('background-size','100%');
			$('#top-view-id').css('background-position','center');
			$('#top-view-id').css('color','#fff');
			$('#top-view-id').css('text-align','center');
		}
    	$(window).scroll(function() { 
              if($(window).scrollTop() == $(document).height() - $(window).height()) {
                  datasource.moredata();
              }
         });
         
         $('#row-data').on('click','.position', function() {
        	 var offset = parseInt($('#lastposition').val());
             var positionid = $(this).attr('data-position-id');
             var getUrl = '${ctx}/recurit/jobDetail.page?jobId='+positionid+'&domain='+domain+'&companyName='+companyName+'&companyBusiness'+companyBusiness;
             sessionStorage.setItem('index_list',$("#row-data").html());
             sessionStorage.setItem('index_page',offset);
             sessionStorage.setItem('index_scroll',$(window).scrollTop());
             window.location.href = getUrl;
         });

         $('#selectParams').change(function () {
			 var offset  = $('#lastposition').val();
			 var domain = $('#domain').val();
			 var city = $('#city').val();
			 var selectParams = $('#selectParams').val();
			 if (companyName != '') {
				 selectParams = companyName;
			 }

			 var getUrl = '${ctx}/recurit/jobList.page?';
			 getUrl += "offset=" + offset;
			 getUrl += "&domain=" + domain;
			 getUrl += "&city=" + city;
			 getUrl += "&selectParams=" + selectParams;
			 getUrl += "&comapnyName=" + companyName;
			 getUrl += "&companyBusiness=" + companyBusiness;

			 window.open(getUrl,"_self")
		 });

		$('#city').change(function () {
			var offset  = $('#lastposition').val();
			var domain = $('#domain').val();
			var city = $('#city').val();
			var selectParams = $('#selectParams').val();
			if (companyName != '') {
				selectParams = companyName;
			}

			var getUrl = '${ctx}/recurit/jobList.page?';
			getUrl += "offset=" + offset;
			getUrl += "&domain=" + domain;
			getUrl += "&city=" + city;
			getUrl += "&selectParams=" + selectParams;
			getUrl += "&comapnyName=" + companyName;
			getUrl += "&companyBusiness=" + companyBusiness;

			window.open(getUrl,"_self")
		});

        wx.ready(function() {
        	var title = 'MedTalent医人才|邀您查看大健康行业本周热招职位';
			if (domain == '影像') {
				title = 'MedTalent医人才|邀您查看影像行业热招职位';
			}
			if (domain == 'IVD') {
				title = 'MedTalent医人才|邀您查看IVD行业热招职位';
			}
        	if (companyName == '飞利浦') {
        		title = 'MedTalent医人才|邀您查看飞利浦医疗本周热招职位';
			}
			if (companyName == '罗氏') {
				title = 'MedTalent医人才|邀您查看罗氏诊断本周热招职位';
			}
			if (companyName == '波士顿') {
				title = 'MedTalent医人才|邀您查看波士顿科学本周热招职位';
			}
			if (companyName == '登士柏') {
				title = 'MedTalent医人才|邀您查看登士柏本周热招职位';
			}
			if (companyName == '拜耳') {
				title = 'MedTalent医人才|邀您查看拜耳本周热招职位';
			}
			if (companyName == '西门子') {
				title = 'MedTalent医人才|邀您查看西门子本周热招职位';
			}
			if (companyName == '联影') {
				title = 'MedTalent医人才|邀您查看联影本周热招职位';
			}
			if (companyName == 'GE') {
				title = 'MedTalent医人才|邀您查看GE医疗本周热招职位';
			}
            if (companyName == '凯杰') {
                title = 'MedTalent医人才|邀您查看凯杰本周热招职位';
            }
            if (companyName == '卡瓦') {
                title = 'MedTalent医人才|邀您查看卡瓦本周热招职位';
            }
			if (companyName == '吉利德') {
				title = 'MedTalent医人才|邀您查看GILEAD本周热招职位';
			}
			if (companyName == '爱齐') {
				title = 'MedTalent医人才|邀您查看爱齐科技本周热招职位';
			}
			if (companyName == '丹纳赫') {
				title = 'MedTalent医人才|邀您DANAHER查看本周热招职位';
			}
        	//分享给朋友
            wx.updateAppMessageShareData({
                title: title,
                desc: '所有对职位感兴趣的朋友们可以通过两种方式自荐或推荐他人',
                link: '${ctx}/recurit/jobList.page?domain='+domain+'&companyName='+companyName,
                imgUrl: 'https://www.tiaonali.com/tnl-rpo/resources/images/sharelogo.jpg'
            });

            //分享到朋友圈
            wx.updateTimelineShareData({
                title: title,
                link: '${ctx}/recurit/jobList.page?domain='+domain+'&companyName='+companyName,
                imgUrl: '${ctx}/resources/images/sharelogo.jpg'
            });

            wx.showOptionMenu();
            
        });
    });
</script>
</body>
</html>